package cn.wolfcode.p2p.business.mapper;

import cn.wolfcode.p2p.business.domain.Bid;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;

public interface BidMapper {

    int insert(Bid record);

    Bid selectByPrimaryKey(Long id);

    int updateByPrimaryKey(Bid record);

    BigDecimal selectTotalBidAmountByBidUserIdAndBidRequestId(@Param("bidRequestId") Long bidRequestId, @Param("userId") Long userId, @Param("bidRequestState") Integer bidRequestState);

    void updateByBidRequestIdAndState(@Param("bidRequestId") Long bidRequestId, @Param("bidrequestState") int bidrequestState);

}